<template>
  <div class="paramConfig">
    <DFPageList ref="dfPageListRef" :pageOptions="pageOptions"/>
  </div>
</template>

<script lang="ts" setup name="Shift">
  import lang from './lang';
  import { pageShift, delShift } from '@/api/base/shift';
  import { useMixins } from '@/hooks/useMixins';

  const { loadLangFn } = useMixins();

  const dfPageListRef: any = ref(null);

  loadLangFn(lang);

  const pageOptions = {
    searchForm: {
      formSchemas: [
        {
          label: 'shiftName',
          component: 'NInput',
        },
        {
          label: 'shiftCode',
          component: 'NInput',
        },
      ],
    },
    table: {
      columns: [
        {
          width: 120,
          label: 'shiftName',
        },
        {
          width: 120,
          label: 'shiftCode',
        },
        {
          width: 120,
          label: 'remark',
          common: true,
        },
      ],
      action: {
        columns: [
          {
            label: 'edit',
            hump: true,
          },
          {
            label: 'delete',
          },
        ],
      },
      operaColumn: [
        {
          label: 'add',
          hump: true,
        },
      ],
      requestFn: pageShift,
      delRequestFn: delShift,
    },
  };

  // nextTick(() => {
  //   dfPageListRef.value && dfPageListRef.value.openModalFn();
  // });
</script>
